package org.esgi.server.dns.message;
import java.io.*;
import java.net.*;

public class Serveur {
static final int port=8081;

	public static void main(String []argv) throws Exception{
		String str;
		ServerSocket serv = new ServerSocket(port); 
		//System.out.println("serveur en attente de connexion sur lengthport:"+port);
		Socket serr=serv.accept();
		//System.out.println("connexion acceptée pour le client");
		BufferedReader in=new BufferedReader(new InputStreamReader(serr.getInputStream()));
		PrintWriter out=new PrintWriter(new BufferedWriter(new OutputStreamWriter(serr.getOutputStream())),true);
		//System.out.println("flux ouvert,serveur pret a recevoir");
		str=in.readLine();

		//affiche au client slt client
		out.println("salut client");

		//on ferme la socketserver et la socket crée
		serr.close();
		//serv.close();
}
}